Turn on Bushnell in default build. Add tests.
authorrobertl <robertl>
Sun, 20 Dec 2009 20:21:24 +0000 (20:21 +0000)
committerrobertl <robertl>
Sun, 20 Dec 2009 20:21:24 +0000 (20:21 +0000)
bushnell.c
naviguide.c
testo
testo.d/bushnell.test [new file with mode: 0644]
vecs.c

index ab943dd1551880e82ce4cf3867a50f68b31c36f9..0b7a0403feffb0e041db6773f2757a9f09cf5c8a 100644 (file)
@@ -188,7 +188,7 @@ bushnell_read(void) {
   icon = gbfgetc(file_in);
   wpt_tmp->icon_descr = bushnell_get_name_from_symbol(icon);
   unknown = gbfgetc(file_in);
-  wpt_tmp->latitude = lat_tmp / 10000000.0;
+  wpt_tmp->latitude = lat_tmp /  10000000.0;
   wpt_tmp->longitude = lon_tmp / 10000000.0;
 
   // Apparently this is always zero terminated, though it's never been
index 82c530a98a2c9252e9b03036b186afe443a549ba..bdcb701ca7d5504717273ff795fb4ac7ab88949b 100755 (executable)
@@ -70,7 +70,6 @@ typedef struct {
 /* Global variables */
 
 static gbfile *file_in, *file_out;
-static short_handle mkshort_handle;
 static gbuint16 nof_wp;
 static route_head *rte_head;
 static ng_file_header_t ng_file_header;
@@ -314,7 +313,6 @@ rd_init(const char *fname)
 {
     file_in = gbfopen_le(fname, "rb", MYNAME);
 
-    mkshort_handle = mkshort_new_handle();
     ng_read_file_header();
 
        if (NULL != process) {
@@ -330,7 +328,6 @@ rd_deinit(void)
 {
     gbfclose(file_in);
     file_in = NULL;
-    mkshort_del_handle(&mkshort_handle);
 }
 
 
diff --git a/testo b/testo
index 8e3471c881cb41be21b22493c8eae2f3c1df1999..a1e014f2c9cc29c6980970d2904d66bb85d357e0 100755 (executable)
--- a/testo
+++ b/testo
@@ -30,6 +30,8 @@ bincompare()
         ${OD} $2 >${TMPDIR}/bc2
         ${DIFF} ${TMPDIR}/bc1 ${TMPDIR}/bc2 || {
                echo ERROR binary comparing $*
+cat ${TMPDIR}/bc1
+cat ${TMPDIR}/bc2
                 exit 1
        }
 }
diff --git a/testo.d/bushnell.test b/testo.d/bushnell.test
new file mode 100644 (file)
index 0000000..3b5ae7a
--- /dev/null
@@ -0,0 +1,11 @@
+rm -f ${TMPDIR}/bushnell.*
+gpsbabel -i bushnell -f ${REFERENCE}/bushnell.wpt -o gpx -F ${TMPDIR}/bushnell.gpx
+compare ${REFERENCE}/bushnell.gpx ${TMPDIR}/bushnell.gpx
+
+# This format has a goofy output naming convention; each wpt must be in a 
+# unique file, so the output name is a template.
+gpsbabel -i bushnell -f ${REFERENCE}/bushnell.wpt -o bushnell -F ${TMPDIR}/bushnell
+# bincompare ${REFERENCE}/bushnell.wpt ${TMPDIR}/bushnell-0.wpt
+
+gpsbabel -i bushnell_trl -f ${REFERENCE}/bushnell_trl.trl -o gpx -F ${TMPDIR}/bushnell_trl.gpx
+compare ${REFERENCE}/bushnell_trl.gpx ${TMPDIR}/bushnell_trl.gpx
diff --git a/vecs.c b/vecs.c
index 2be6dce4d1fe39413dbe4ddc8c100c0414f1ef52..03cc09e950aeb88d089e7470d2e10fdc9911d77f 100644 (file)
--- a/vecs.c
+++ b/vecs.c
@@ -914,7 +914,6 @@ vecs_t vec_list[] = {
                 "Memory-Map Navigator overlay files (.mmo)",
                 "mmo"
         },
-#if PLANE || 1
         {
                 &bushnell_vecs,
                 "bushnell",
@@ -927,7 +926,6 @@ vecs_t vec_list[] = {
                 "Bushnell GPS Trail file",
                 "trl"
         },
-#endif
         {
                &skyforce_vecs,
                "skyforce",